#include <iostream>

using namespace std;

int main()
{
	int val;
	cin>>val;
	while(val!=42)
		cout<<val<<endl;
	return 0;
}